package com.service;

import java.util.List;
import java.util.Map;

import com.utils.DataTables;
import com.entity.HousingEstate;

/**
 * 小区管理service层接口
 */
public interface HousingEstateService {
    /**
     * 获得HousingEstate数据的总行数
     *
     * @return
     */
    long getHousingEstateRowCount();

    /**
     * 查询所有小区信息列表
     * 获得HousingEstate数据集合
     *
     * @return
     */
    List<HousingEstate> selectHousingEstate();


    /**
     * 1.小区列表分页查询
     *
     * @param dataTables
     * @return
     */
    DataTables getPageList(DataTables dataTables);


    /**
     * 2.添加小区信息
     *
     * @param housingEstate
     * @return
     */
    Map<String, Object> addHousingEstate(HousingEstate housingEstate);

    /**
     * 获得一个HousingEstate对象,以参数HousingEstate对象中不为空的属性作为条件进行查询
     *
     * @param obj
     * @return
     */
    HousingEstate selectHousingEstateByObj(HousingEstate obj);

    /**
     * 通过HousingEstate的id获得HousingEstate对象
     *
     * @param id
     * @return
     */
    //查询小区详情
    HousingEstate selectHousingEstateById(Integer id);

    /**
     * 3.修改小区信息
     *
     * @param housingEstate
     * @return
     */
    Map<String, Object> updateHousingEstate(HousingEstate housingEstate);

    /**
     * 4.删除小区信息
     *
     * @return
     */
    Map<String,Object> delHousingEstate(List<Integer> idList);

    /**
     * 插入HousingEstate到数据库,包括null值
     *
     * @param value
     * @return
     */
    int insertHousingEstate(HousingEstate value);

    /**
     * 添加小区信息
     * 插入HousingEstate中属性值不为null的数据到数据库
     *
     * @param value
     * @return
     */
    int insertNonEmptyHousingEstate(HousingEstate value);

    /**
     * 批量添加小区信息
     * 批量插入HousingEstate到数据库
     *
     * @param value
     * @return
     */
    int insertHousingEstateByBatch(List<HousingEstate> value);

    /**
     * 通过HousingEstate的id删除HousingEstate
     *
     * @param id
     * @return
     */

    int deleteHousingEstateById(Integer id);


    /**
     * 通过HousingEstate的id更新HousingEstate中的数据,包括null值
     *
     * @param
     * @return
     */
    int updateHousingEstateById(HousingEstate housingEstate);

    /**
     * 通过HousingEstate的id更新HousingEstate中属性不为null的数据
     *
     * @param enti
     * @return
     */
    int updateNonEmptyHousingEstateById(HousingEstate enti);

    HousingEstate selectHousingEstateByCode(String housCode);

    String getPrivinceByCode(String province_code);

    String getCityByCode(String city_code);

}